<%--
  ** Copyright(c) 2005 BroadVision, Inc. All rights reserved.
  **
  ** This software is copyrighted.  Under the copyright laws, this software
  ** may not be copied, in whole or in part, without prior written consent
  ** of BroadVision, Inc. or its assignees. This software is provided under
  ** the terms of a license between BroadVision and the recipient, and its
  ** use is subject to the terms of that license.
  **
  ** This software may be protected by one or more U.S. and International
  ** patents. Certain applications of BroadVision One-To-One software are
  ** covered by U.S. patent 5,710,887.
  **
  ** TRADEMARKS: BroadVision and the BroadVision logo are registered
  ** trademarks, and BroadVision One-To-One is a trademark of BroadVision,
  ** Inc. IONA and Orbix are trademarks of IONA Technologies, Ltd. RSA,
  ** MD5, and RC2 are trademarks of RSA Data Security, Inc. All other
  ** trademarks, service marks, and trade names belong to their respective
  ** owners. BroadVision, Inc. disclaims any proprietary interest in the
  ** marks and names of others.
  --%>

<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html-el" %>
<%@ taglib uri="/WEB-INF/struts-bean-el.tld" prefix="bean-el" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>

<%@ page import="java.util.HashMap" %>
<%@ page import="org.apache.struts.Globals" %>
<%@ page import="org.apache.struts.action.ActionMapping" %>
<%@ page import="com.broadvision.report.admin.ReportConfig" %>
<%@ page import="com.broadvision.report.admin.ProcessConfig" %>
<%@ page import="com.broadvision.ssp.client.SelfServiceProcess" %>

<%
  final String ctxPath = request.getContextPath();
  final ReportConfig reportModel =
          (ReportConfig)request.getAttribute("runtimeReportConfigModel");

  // get process name: work around issue with non-public base class
  //
  final SelfServiceProcess procSspModel =
          (SelfServiceProcess)request.getAttribute("procSspModel");
  if (procSspModel != null)
    pageContext.setAttribute("procName", procSspModel.getName());

  final HashMap map = new HashMap();
  map.put("procIndex", request.getAttribute("procIndex"));
  map.put("flowIndex", request.getAttribute("flowIndex"));
  pageContext.setAttribute("pagetabParam", map, PageContext.PAGE_SCOPE);
%>

<script language="Javascript">
  function doDelete(form)
  {
    var msg = '<bean-el:message key="bp.report.pageflow.confirm.delete" bundle="bp.messages"/>';

    if (!confirm(msg))
      return false;

    form.submit();
    return true;
  }
</script>

<c:set var="flowName" value="${flowDef.friendlyName}"/>

<table class="zoneFive" summary="report process configurable"
       width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="pageTitle" valign="top">
      <bean-el:message
        key="bp.report.pageflowEdit.title"
        bundle="bp.messages"
        arg0="${flowName}"
      />
    </td>
    <td class="pageTitle" valign="top" align="right" nowrap>
      <form method="POST"
            action="<%=ctxPath + "/bp/reportPageflowDelete.do"%>">
        <html-el:hidden property="procIndex" value="${procIndex}"/>
        <html-el:hidden property="taskIndex" value="${flowIndex}"/>
        <html-el:submit styleClass="inputButton" property="actionDelete"
                        onclick="return doDelete(this.form)">
          <bean-el:message key="button.delete" bundle="bp.messages"/>
        </html-el:submit>
      </form>
    </td>
  </tr>
  <tr>
    <td valign="top" width="100%" colspan="2">
      <c:if test="${!empty reportConfigStatusKey}">
        <bean-el:message key="${reportConfigStatusKey}" bundle="bp.messages"/>
      </c:if>
      <div class="errorMessage">
        <html-el:errors bundle="bp.messages"/>
      </div>
      <div><%@include file="/mc/common/pagetab.jsp"%></div>
      <div class="breadcrumb">
        <c:set var="pathSeparator">
          <bean-el:message
            key="bp.report.pageflowEdit.pathSeparator" bundle="bp.messages"
          />
        </c:set>
        <c:url var="procUrl" value="/bp/reportEditProcess/pageflow.do">
          <c:param name="procIndex" value="${procIndex}"/>
        </c:url>
        <a href="<c:out value="${procUrl}"/>">
          <c:out value="${procName}"/>
        </a>
        &nbsp;<c:out value="${pathSeparator}" escapeXml="false"/>&nbsp;
        <c:out value="${flowName}"/>
      </div>
    </td>
  </tr>

  <tiles:get name="configurable"/>

</table>

<!-- =============================================================
  ** vim: set ts=2 expandtab syntax=jsp:
  -->
